using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Xml.Linq;

namespace Avinor.NET
{
    public class AvinorParser
    {
        readonly Stream _stream;

        public AvinorParser(Stream stream)
        {
            _stream = stream;
        }   
        
        protected IEnumerable<XElement> GetDescendants(string elementName)
        {
            var _xmlDoc = XDocument.Load(new StreamReader(_stream, Encoding.GetEncoding("iso-8859-1")));
            return _xmlDoc.Descendants(elementName);
        }
    }
}